﻿using System;
using System.Diagnostics;
using System.Runtime.Serialization;

namespace FitProcess_UnitTests
{
	public class MyClass
	{
		static int SProcessId { get { return Process.GetCurrentProcess().Id; } }

		public int ProcessId()
		{
			return SProcessId;
		}

		public int Field;

		public void Throw()
		{
			throw new MyException();
		}

		public MyStruct SomeStruct;
	}

	public struct MyStruct
	{
		public int A;
		public int B;
	}

	[Serializable]
	public class MyException : Exception
	{
		//
		// For guidelines regarding the creation of new exception types, see
		//    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/cpconerrorraisinghandlingguidelines.asp
		// and
		//    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncscol/html/csharp07192001.asp
		//

		public MyException()
		{
		}

		public MyException(string message) : base(message)
		{
		}

		public MyException(string message, Exception inner) : base(message, inner)
		{
		}

		protected MyException(
			SerializationInfo info,
			StreamingContext context) : base(info, context)
		{
		}
	}
}